
package com.gome.gop.common;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

/**
 * 
 * @Title:订单异常类型
 * @Description:
 * @Author:chengcheng7
 * @Since:2019年5月13日 上午11:23:13
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 * @Version:1.1.0
 */
public enum OrderExceptionTypeEnum {
    
    BEYOND_SCOPE("OE001")//订单超区配送
    
    ;
    
    public static List<String> getNameList() {
        OrderExceptionTypeEnum[] documentTypes = OrderExceptionTypeEnum.values();
        List<String> list = new ArrayList<String>();
        for (OrderExceptionTypeEnum documentType : documentTypes) {
            list.add(documentType.toString().toUpperCase());
        }
        return list;
    }
    
    public static List<String> getValueList() {
        OrderExceptionTypeEnum[] documentTypes = OrderExceptionTypeEnum.values();
        List<String> list = new ArrayList<String>();
        for (OrderExceptionTypeEnum documentType : documentTypes) {
            list.add(documentType.getValue().toString().toUpperCase());
        }
        return list;
    }
    
    private String value;
    
    private OrderExceptionTypeEnum(String value) {
        this.value = value;
    }
    
    public String getValue() {
        return value;
    }
    
    public void setValue(String value) {
        this.value = value;
    }
    
    public static OrderExceptionTypeEnum getEnumByvalue(String value) {
        for (OrderExceptionTypeEnum userAccountEnum : OrderExceptionTypeEnum.values()) {
            if (StringUtils.equals(value, userAccountEnum.getValue())) {
                return userAccountEnum;
            }
        }
        return null;
    }
    
    public static void main(String[] args) {
    }
}
